<?php 

global $forum_city,$city_info;
define('APP_URL', 'http://app.mi.com/detail/102202?ref=search');

?>
<?php if (!empty($_GET['app_version'])) $_SESSION['app_version'] = $_GET['app_version']; ?>
<?php if (!empty($city_info['background_url'])) { ?>
<style type="text/css" media=screen>
body {  
	background:#f5f5f5 url(<?php echo $city_info['background_url'] ?>) repeat center center fixed; 	
}
</style>
<?php } ?>
<nav class="navbar navbar-default navbar-2">
<div class="container">
<div class="row clearfix">
	<div class="navbar-header">
		<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-forum"> <span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button>
                <?php if (!empty($_SESSION['app_version'])) { ?>
		<a class="pull-right visible-xs navbar-toggle" style="padding:4px 10px;font-size:17px" href="javascript:$('#forum_share').toggle()"> <span class="glyphicon glyphicon-share" aria-hidden="true"></span> </a> 
		<p id="forum_share" class="dropdown-menu" style="padding:15px;width:100%;border:1px solid #ccc"></p> <script> $('#forum_share').html(document.title+' '+location.href) </script>
                <?php } ?>
		<li id="forum_kind">
		<a id="drop_forum_kind" href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" onclick="get_forum_kind_nav()"><img class="forum-logo" src="img/forum/forum_logo/<?php echo $forum_city ?>.png" alt="<?php echo $city_info['name'].SYS_NAME ?>"/> </a>
		<ul id="menu_forum_kind" class="dropdown-menu" role="menu" aria-labelledby="drop_forum_kind">
			<!-- 频道分类加载区 -->	
		</ul>
		</li>
	</div>
	<div class="collapse navbar-collapse" id="navbar-collapse-forum">
		<ul class="nav navbar-nav">
			<?php global $config ?>
			<?php if(!empty($_SESSION['auth']) && (in_array($_SESSION['auth']['id'], $config['manager']) || $city_info['user_id'] == $_SESSION['auth']['id'])) { ?>
			<li id="forum_manage">
			<a id="forum_manage" href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">管理</a>
			<ul id="menu_my" class="dropdown-menu" role="menu" aria-labelledby="forum_manage">
				<li id="forum_city_edit"><a href="?c=forum&a=forum_city_edit">城市</a></li>
				<li id="forum_kind_mng"><a href="?c=forum&a=forum_kind_manage">分类管理</a></li>
				<?php if (1 == $city_info['carousel']) { ?>
				<li id="forum_carousel_mng"><a href="?c=forum&a=forum_carousel_manage">滚动图管理</a></li>
				<?php } ?>
			</ul>
			</li>
			<?php } ?>
			<li id="forum_t_list"><a target="_blank" href="<?php echo s_url('?c=forum&a=forum_t_list') ?>">我要发布</a></li>
			<li id="forum_cal"><a target="_blank" href="<?php echo s_url('?c=forum&a=forum_cal') ?>">超级日历</a></li>
			<li id="forum_list"><a target="_blank" href="<?php echo s_url('?c=forum&a=forum_list') ?>">频道搜索</a></li>
			<li id="bd_search"><a target="_blank" href="<?php echo s_url('?c=bd_search&a=bd_search') ?>">全网搜索</a></li>
			<li id="f_tools">
			<a id="f_tools" href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">功能</a>
			<ul id="f_tools" class="dropdown-menu" role="menu" aria-labelledby="f_tools">
				<?php if (!empty($_SESSION['app_version'])) { ?>
				<li><a target="_blank" href="<?php echo s_url('?c=websocket&a=quaggaJS') ?>">扫一扫</a></li>
				<li class="divider"></li>
				<?php } ?>
				<li id="index_hao123"><a target="_blank" href="<?php echo s_url('?c=bd_search&a=hao123') ?>">传送门</a></li>
				<li id="index_news"><a target="_blank" href="<?php echo s_url('?c=forum&a=index_news') ?>">推新闻</a></li>
				<li class="divider"></li>
				<li id="index_tejia"><a target="_blank" href="<?php echo s_url('?c=forum&a=index_tejia') ?>">特卖汇</a></li>
			</ul>
			</li>
		</ul>
		<ul class="nav navbar-nav navbar-right">
			<li id="websocket">
			<a id="websocket" href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">HIICI直播</a>
			<ul id="websocket" class="dropdown-menu" role="menu" aria-labelledby="websocket">
				<li><a target="_blank" href="<?php echo s_url('?c=websocket&a=hiici_ls') ?>">直播搜索</a></li>
				<li><a target="_blank" href="<?php echo s_url('?c=websocket&a=hiici_ls&m_f=1') ?>">我关注的直播</a></li>
				<li><a target="_blank" href="<?php echo s_url('?c=websocket&a=websocket_ui') ?>">娱乐间</a></li>
				<li class="divider"></li>
				<li><a href="<?php echo s_url('?c=websocket&a=agreement') ?>">我要直播</a></li>
			</ul>
			</li>
			<li id="drop_my">
			<a id="drop_my" href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">我的 <?php if (!empty($_SESSION['user_has_order'])) echo '<span class="label label-success">订</span>' ?></a>
			<ul id="menu_my" class="dropdown-menu" role="menu" aria-labelledby="drop_my">
				<li><a href="<?php echo s_url('?c=forum&a=topic_my_list') ?>">我的信息</a></li>
				<li><a href="<?php echo s_url('?c=forum&a=topic_my_list&m_falter=8') ?>">我喜欢的信息</a></li>
				<li class="divider"></li>
				<li><a href="<?php echo s_url('?c=forum&a=topic_my_list&m_falter=1') ?>">我的订单</a></li>
				<li><a href="<?php echo s_url('?c=forum&a=topic_my_list&m_falter=7') ?>">我结束的订单</a></li>
				<li class="divider"></li>
				<li><a href="<?php echo s_url('?c=forum&a=forum_list&m_falter=1') ?>">我的频道</a></li>
				<li id="forum_follow_list"><a href="<?php echo s_url('?c=forum&a=forum_list&m_falter=2') ?>">我关注的频道</a></li>
				<li class="divider"></li>
				<li><a href="<?php echo s_url('?c=forum&a=forum_add') ?>">开通频道</a></li>
				<li><a href="<?php echo s_url('?c=forum&a=forum_list&m_falter=3') ?>">换主频道</a></li>
				<li class="divider"></li>
				<?php if (!empty($_SESSION['auth'])) { ?>
				<li><a href="<?php echo s_url('?c=forum&a=take_money&price_r=10') ?>">付款</a></li>
				<li><a href="<?php echo s_url('?c=forum&a=take_money') ?>">收款</a></li>
				<li class="divider"></li>
				<?php } ?>
				<li><a href="<?php echo s_url('?c=index&a=forum_city_choice') ?>">城市</a></li>
			</ul>
			</li>
		</ul>
	</div>
</div>
</div>
</nav>
<div class="visible-xs" style="height:51px"></div>
